﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Agenda.Entities;
using Agenda.Repositories;

namespace Agenda.Service
{
    public class PersonService
    {
        public void Add(Person person)
        {
            new PersonRepository().Add(person);
        }

        public Person Get(int id)
        {
            return new PersonRepository().Get(id);
        }

        public List<Person> ListBy(DBObjects.Person field, string q)
        {
            return new PersonRepository().Listby(field, q);
        }

        public void Update(Person per)
        {
            new PersonRepository().Update(per);
        }
    }
}
